package com.itheima.date;

import com.itheima.health.utils.DateUtils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class testDate {
    public static void main(String[] args) throws Exception{
       // String a = "1994-09-26";
        String a = "2020-10-15";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date parse = sdf.parse(a);

        int currentAge = DateUtils.getCurrentAge(parse);
        System.out.println(currentAge);
    }
}
